<div ng-controller="receivableStatisticsController" dw-loading="Expect">
	<div class="bg-light lter b-b wrapper-sm">
		<h1 class="m-n font-thin h4">应收统计</h1>
	</div>
	<div class="wrapper-sm">
		<div class="panel panel-default">
			<div class="panel-heading font-bold">查询</div>
			<div class="panel-body">
				<label class="control-label pull-left m-t-xs w-xs">结算单位</label>
				<div class="col-md-3 form-group">
					<div angucomplete-alt 
						id="settle" 
						pause="100" 
						selected-object="settleBoxSelect"
						remote-api-handler="searchSettle" 
						search-fields="name" 
						title-field="name" 
						minlength="1" 
						input-class="form-control form-control-small input-sm"
						initial-value="queryTerms.settleName" 
						match-class="highlight" 
						input-changed="inputChanged"
						>
					</div>
				</div>
				<label class="control-label pull-left m-t-xs w-xs">起始时间</label>
				<div class="col-md-2 col-xs-12 form-group">
					<div class="input-group input-group-sm date">
						<input id="starttime" datetimepicker plugintype="datetime" ng-model="queryTerms.startTime" placeholder="起始时间" class="form-control" type="text"
						/>
						<span id="openstarttime" class="input-group-addon curpoint">
                            <span class="glyphicon glyphicon-calendar"></span>
						</span>
					</div>
				</div>
				<label class="control-label pull-left m-t-xs w-xs">结束时间</label>
				<div class="col-md-2 col-xs-12 form-group">
					<div class="input-group input-group-sm date">
						<input id="endtime" datetimepicker plugintype="datetime" ng-model="queryTerms.endTime" placeholder="结束时间" class="form-control" type="text"
						/>
						<span id="openendtime" class="input-group-addon curpoint">
                            <span class="glyphicon glyphicon-calendar"></span>
						</span>
					</div>
				</div>
				<div class="col-md-2 col-xs-12">
					<button id="searchStatistics" ng-click="queryFunc()" class="btn btn-sm btn-default btn-addon" ng-class="{'disabled':querying}" ng-disabled="querying">
                        <i class="fa fa-search" ng-show="!querying"></i>
                        <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                        <span ng-show="!querying">查询</span>
                        <span ng-show="querying">查询中...</span>
                    </button>
				</div>
			</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-heading font-bold"></div>
			<div class="panel-body">
				<label class="control-label pull-left m-t-xs w-xs">已开票金额</label>
				<div class="col-md-2 form-group">
					<input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="alreadyInvoiceAmount" ng-model="receivableData.alreadyInvoiceAmount"
						disabled="disabled" name="alreadyInvoiceAmount">
				</div>
				<label class="pull-left m-t-xs control-label">元</label>
				<label class="control-label pull-left m-t-xs m-l-sm w-xs">已不含税金额</label>
				<div class="col-md-2 form-group">
					<input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="excludingTaxAmount" ng-model="receivableData.excludingTaxAmount"
						disabled="disabled" name="excludingTaxAmount">
				</div>
				<label class="pull-left m-t-xs control-label">元</label>
				<label class="control-label pull-left m-t-xs w-xs">收入金额</label>
				<div class="col-md-2 form-group">
					<input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="incomeAmount" ng-model="receivableData.incomeAmount"
						disabled="disabled" name="incomeAmount">
				</div>
				<label class="pull-left m-t-xs control-label">元</label>
				<div class="line line-xs pull-in"></div>
				<label class="control-label pull-left m-t-xs w-xs">未收金额</label>
				<div class="col-md-2 form-group">
					<input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="uncollectedAmountz" ng-model="receivableData.uncollectedAmount"
						disabled="disabled" name="uncollectedAmount">
				</div>
				<label class="pull-left m-t-xs control-label">元</label>
				<label class="control-label pull-left m-t-xs m-l-sm w-xs">未结账金额</label>
				<div class="col-md-2 form-group">
					<input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="accountEnRouteAmount" ng-model="receivableData.accountEnRouteAmount"
						disabled="disabled" name="accountEnRouteAmount">
				</div>
				<label class="pull-left m-t-xs control-label">元</label>
				<label class="control-label pull-left m-t-xs w-xs">总余额</label>
				<div class="col-md-2 form-group">
					<input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="allBalance" ng-model="receivableData.allBalance"
						disabled="disabled" name="allBalance">
				</div>
				<label class="pull-left m-t-xs control-label">元</label>
			</div>
			<div class="panel-heading bor-t">
				应收统计列表
			</div>
			<div class="table-responsive">
				<div ui-grid="gridOptions"  ui-grid-selection ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="min-width:1000px; height:{{heightA}}px; min-height:395px;overflow-y:hidden;">
					<div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
				</div>
			</div>
			
			<div class="panel-body">
				<button id="finance" ng-click="receivableFinance()" class="pull-right-xs btn btn-sm btn-info btn-addon" ng-show="true"><i class="fa fa-cny"></i>财务明细</button>
				<button id="income" ng-click="receivableIncomeList()" class="pull-right-xs btn btn-sm btn-success btn-addon" ng-show="true"><i class="fa fa-file-text-o"></i>收入明细单</button>
				<button id="account" ng-click="receivableAccountsList()" class="pull-right-xs btn btn-sm btn-danger btn-addon" ng-show="true"><i class="fa fa-file-o"></i>未结账明细单</button>
				<button id="excelStatistics" ng-click="exportFunc()" class="pull-right-xs btn btn-sm btn-success btn-addon" ng-show="true"><i class="fa fa-download"></i>导出报表</button>
			</div>
		</div>
	</div>
</div>